package ltd.newbee.mall.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.ibatis.type.JdbcType;

import java.util.Date;

@Data
@TableName("tb_newbee_mall_user")
public class MallUser {
    @TableField(value = "user_id", jdbcType = JdbcType.BIGINT)
    private Long userId;

    @TableField(value = "nick_name", jdbcType = JdbcType.VARCHAR)
    private String nickName;

    @TableField(value = "login_name", jdbcType = JdbcType.VARCHAR)
    private String loginName;

    @TableField(value = "password_md5", jdbcType = JdbcType.VARCHAR)
    private String passwordMd5;

    @TableField(value = "introduce_sign", jdbcType = JdbcType.VARCHAR)
    private String introduceSign;

    @TableField(value = "is_deleted", jdbcType = JdbcType.TINYINT, insertStrategy = FieldStrategy.NOT_EMPTY)
    private Byte isDeleted;

    @TableField(value = "locked_flag", jdbcType = JdbcType.TINYINT, insertStrategy = FieldStrategy.NOT_EMPTY)
    private Byte lockedFlag;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "create_time", jdbcType = JdbcType.TIMESTAMP, insertStrategy = FieldStrategy.NOT_EMPTY)
    private Date createTime;
}
